import request from '@/utils/request'
// 查询员工列表
export const getEmployeeListApi = (params) => request({ url: '/sys/user', params })

/**
 * 导出员工的excel
 * **/

export const exportEmployeeApi = () => request({ url: '/sys/user/export', responseType: 'blob' })
/**
 * 下载员工导入模版
 * **/

export const getExportTemplateApi = () => request({ url: '/sys/user/import/template', responseType: 'blob' })

/**
 * 上传用户的excel
 *
*/
export const uploadExcelApi = (data) => request({ url: '/sys/user/import', method: 'post', data })

// 删除员工
export const delEmployeeApi = (id) => request({ url: `/sys/user/${id}`, method: 'delete' })

// 新增员工
export const addEmployeeApi = (data) => request({ url: '/sys/user', method: 'post', data })

// 获取员工详情
export const getEmployeeDetailApi = (id) => request({ url: `/sys/user/${id}` })

// 编辑员工
export const updateEmployeeApi = (data) => request({ url: `/sys/user/${data.id}`, method: 'put', data })

// 群发通知接口
export const sendMultiMessageApi = data => request.post('/sys/messageMuch', data)

// 获取用户消息
export const getUserMessageApi = () => request.get('/sys/message')
// 删除用户信息
export const delUserMessageApi = id => request.delete(`/sys/message/${id}`)
// 已读消息
export const updateUserMessageApi = id => request.put(`/sys/message/${id}`)
